package com.wwg.controller;

import com.wwg.entity.ProductReq;
import com.wwg.service.ProductService;
import com.wwg.vo.ReturnDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("multiDataSource")
public class MultiDataSourceTestController {

    @Autowired
    private ProductService productService;

    @PostMapping("productData")
    @ResponseBody
    public ReturnDto getProductData(@RequestBody ProductReq productReq){

        productService.getProductCount();

        return ReturnDto.SUCCESS;
    }
}
